home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / netbsd / contrib / easyinstall-1.4.readme < prev    next >
Text File  |  1996-01-08  |  11KB  |  264 lines

  1. Descr: Using and making optional packages available for NetBSD/Amiga
  2. Uploader: Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>
  3. Author: Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>
  4. Keywords: Software Management, Packages
  5.  
  6.     Using and making optional packages available for NetBSD/Amiga
  7.     #############################################################
  8.                 (C) Hubert Feyrer, january 8th, 1996
  9.  
  10.  
  11.        Summary:
  12.        ~~~~~~~~
  13.        This document describes how optional packages should be
  14.        structured so they can be easily installed and removed.
  15.        Furthermore,  a method for simplifying the installation
  16.        is  introduced and hints   on how to configure optional
  17.        packages are included.
  18.  
  19.  
  20. 0) Contents
  21. ~~~~~~~~~~~
  22.   0. Contents
  23.   1. Introduction
  24.      1.1 Format of packages
  25.      1.2 Accessing packages easily
  26.      1.3) Other things to do while installing packages
  27.   2. The installation process
  28.      2.1 Things done while installing
  29.      2.2 Things done while uninstalling
  30.   3. Configuring the installation process
  31.   4. A note on configuring packages
  32.   5. Future plans
  33.   6. Disclaimer & legal stuff
  34.   7. Availability
  35.   8. Final note
  36.  
  37.  
  38. 1) Introduction
  39. ~~~~~~~~~~~~~~~
  40. As stated in an earlier posting, I'd like to see all optional packages
  41. reside in their own directory below one common directory (/usr/local).
  42. Packages are placed in subdirectories below /usr/local, with the directory
  43. name of the package giving name and version of the package,
  44. e.g. /usr/local/fvwm-1.23f, /usr/local/bash-1.14.1.
  45.  
  46.  
  47. 1.1) Format of packages
  48. ~~~~~~~~~~~~~~~~~~~~~~~
  49. Below the package-directories, files are stored in the following
  50. subdirectories:
  51.  
  52.  - binaries:             bin
  53.  - formatted man-pages:     man/cat[1-8]
  54.  - unformatted man-pages:     man/man[1-8]
  55.  - misc files:             etc
  56.  - libraries:             lib
  57.  - includes:             include
  58.  - info-files:             info
  59.  
  60. Information for installing the package is provided in the subdirectory
  61. "install", namely as a script "install.sh" for installation and
  62. (recommended) "uninstall.sh" for removing the package.
  63.  
  64.  
  65. 1.2) Accessing packages easily
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. Having several packages installed would force users to include serveral
  68. bin-directories into their $PATH, get unwieldly long $MANPATHs, ... To
  69. prevent this, files that are accessed by users are linked to some public
  70. directories below /usr/local. The directories used are exactly the same as
  71. the ones used inside the packages. Doing this has two advantages:
  72.  
  73. - easy installation of packages
  74. - users have to include only one directory into their $PATH
  75.   (/usr/local/bin), $MANPATH (/usr/local/man), ...  
  76.  
  77. This document is intended to describe a mechanism for making packages
  78. accessible via those public directories.
  79.  
  80.  
  81. 1.3) Other things to do while installing packages
  82. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83. There are also some more things to handle when installing packages,
  84. namely:
  85.  
  86.  - installing X application defaults
  87.  - making files setuid root
  88.  - creating auxiliary directories (for more libraries, includes, ...)
  89.  - Pre/Post-install scripts (not yet)
  90.  
  91.  
  92. 2) The installation process
  93. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  94. I've written some shell scripts that should help installing optional
  95. (precompiled) packages on ones system by doing the things mentioned
  96. above. All one has to do to configure the installation is to set some
  97. variables in a (shell)script that will be uses for installation as
  98. well as de-installation.
  99.  
  100.  
  101. 2.1) Things done while installing
  102. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103. The "install.sh"-script does the following things while making a package
  104. publically available:
  105.  
  106. a) If application defaults are to be installed, figure out the directory
  107.    where to put them. The following directories are searched:
  108.  
  109.     - /usr/lib/X11/app-defaults
  110.     - /usr/local/X11R6/lib/X11/app-defaults
  111.     - /usr/X11R6/lib/X11/app-defaults
  112.     - /usr/local/X11R5/lib/X11/app-defaults
  113.     - /usr/X11R5/lib/X11/app-defaults
  114.     - $BASE/X11R6/lib/X11/app-defaults 
  115.     - $BASE/X11R5/lib/X11/app-defaults
  116.  
  117.     (BASE is the directory below which packages are installed, usually
  118.      /usr/local, but can be changed, although this is not recommended)
  119.  
  120.    If no directory can be found, the user will be prompted to insert on.
  121. b) Create /usr/local and additional directories (for includes, libraries,
  122.    ...).
  123. c) Link files specified from /usr/local/<package>/bin to /usr/local/bin.
  124.    Same for files in etc, lib, man/man[1-8], man/cat[1-8], info and
  125.    include. Directories that do not exist will be created.
  126. d) Install X application defaults into the directory previously figured
  127.    out. 
  128. e) Set specified files setuid root.
  129.  
  130.  
  131. 2.2) Things done while uninstalling
  132. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  133. "uninstall.sh" performs the following tasks while removing the package from
  134. public directories:
  135.  
  136. a) Find out directory for application defaults as described above.
  137. b) Remove files from public directories: bin, etc, lib, man/man[1-8],
  138.    man/cat[1-8], info, include. After that, directories will be removed if
  139.    they are empty.
  140. c) The X application default file is removed.
  141. d) Remove misc directories for libraries, etc.
  142.  
  143. Please note: the package itself (/usr/local/<package>) is *not* removed!
  144.  
  145.  
  146. 3) Configuring the installation process
  147. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  148. The two scripts "install.sh" and "uninstall.sh" are expected to be placed
  149. in a packages "install" subdirectory. This is also the place where the two
  150. scripts look for a file "package" which describes the package.
  151.  
  152. The packag-file contains only definitions for some (environment) variables,
  153. namely:
  154.  
  155. - BASE: Base of public directories. Defaults to "/usr/local" and should not
  156.         be changed.
  157. - PKG: Absolute patch of the package, usually "$BASE/package-name".
  158. - BIN: Which files to link from $PKG/bin to $BASE/bin. Must be enclosed in 
  159.        "quotes" if more than one file is given (space-seperated).
  160. - ETC: Which files from $PKG/etc will be needed in $BASE/etc? (Note: You
  161.        should compile in /usr/local/packagename as base for packages, not
  162.        /usr/local. This way you won't have to link files into
  163.        /usr/local/etc.)
  164. - LIB: Libraries of public interrest, relative to $PKG/lib. Additional
  165.        libraries can be created by setting MISCDIRS (see below).
  166. - MAN1: which unformatted man-pages to link from $PKG/man/man1 to
  167.         $BASE/man/man1 (including ".1"-suffix!). Descriptions for general
  168.         commands go here.  
  169. - MAN2: same as MAN1 (suffix: ".2"), just for system calls.
  170. - MAN3: same as MAN1 (suffix: ".3"), just for C libraries.
  171. - MAN4: same as MAN1 (suffix: ".4"), just for device drivers.
  172. - MAN5: same as MAN1 (suffix: ".5"), just for file formats.
  173. - MAN6: same as MAN1 (suffix: ".6"), just for games.
  174. - MAN7: same as MAN1 (suffix: ".7"), just for miscellaneous things that
  175.         don't fit else where.  
  176. - MAN8: same as MAN1 (suffix: ".8"), just for system administrative
  177.         commands. 
  178. - MAN9: same as MAN1 (suffix: ".9"), just for kernel internals
  179. - MANN: same as MAN1 (suffix: ".n"), just for more misc stuff
  180. - MANL: same as MAN1 (suffix: ".l"), just for local software
  181. - CAT1: which formatted man-pages to link from $PKG/man/cat1 to
  182.         $BASE/man/cat1 (including ".0"-suffix!). Descriptions for general 
  183.         commands go here. 
  184. - CAT2: same as CAT1 (suffix: ".0"), just for system calls.
  185. - CAT3: same as CAT1 (suffix: ".0"), just for C libraries.
  186. - CAT4: same as CAT1 (suffix: ".0"), just for device drivers.
  187. - CAT5: same as CAT1 (suffix: ".0"), just for file formats.
  188. - CAT6: same as CAT1 (suffix: ".0"), just for games.
  189. - CAT7: same as CAT1 (suffix: ".0"), just for miscellaneous things that
  190.         don't fit else where. 
  191. - CAT8: same as CAT1 (suffix: ".0"), just for system administrative commands.
  192. - CAT9: same as CAT1 (suffix: ".0"), just for kernel internals
  193. - CATN: same as CAT1 (suffix: ".0"), just for more misc stuff
  194. - CATL: same as CAT1 (suffix: ".0"), just for local software
  195. - INFO: files to link to $BASE/info. Modification of "$BASE/info/dir"
  196.         should be done by some smart post-processing script (once these are 
  197.         implemented ;-).
  198. - APPDEF: Application default files, relative to $PKG, usually
  199.           "lib/XApp.ad". Suffix ".ad" will be stripped in link.
  200. - INCLUDE: Files to link into $BASE/include, e.g. for libraries like
  201.            readline. Additional subdirectories can be created by setting
  202.            MISCDIRS. 
  203. - SUIDROOT: Which files (relative to $PKG) to make setuid-root (just in
  204.             case tar goofed some protections/ownerships).
  205. - MISCDIRS: Which additional directories to create under $BASE. Usually for
  206.             grouping includes or libraries.
  207.  
  208.  
  209. 4.) A note on configuring packages
  210. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  211. When compiling optional packages, make the base-directory
  212. "/usr/local/<package>", not "/usr/local". By doing so you don't have to
  213. put every single file into public directories, but only the ones of
  214. interrest for users (usually binaries and man pages).
  215.  
  216.  
  217. 5.) Future plans
  218. ~~~~~~~~~~~~~~~~
  219. There are some things I can think of that might be useful:
  220.  
  221.  - Pre/Post-install-scripts which will be run before/after the installation
  222.    to backup files, etc.
  223.  - Some smart script to edit config-files. Useful for adding info-files to
  224.    the dir-file or think if one wants to install wu-ftpd: editing
  225.    /etc/inetd.conf by hand. :-/
  226.  - Merge with the Solaris- and SunOS-port >:)
  227.  
  228.  
  229. 6.) Disclaimer & legal stuff
  230. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  231. Use at your own risk. All rights reserved. I take no responsibility for
  232. nothing. This software may not be used in non-academic environment 
  233. withour the autor's written permission.
  234.  
  235.  
  236. 7.) Availability
  237. ~~~~~~~~~~~~~~~~
  238. I'll put this all together into a package "EasyInstall-1.4.tar.gz" and place
  239. it into /pub/NetBSD-Amiga/contrib on ftp.uni-regensburg.de.
  240.  
  241.  
  242. 8.) Final note
  243. ~~~~~~~~~~~~~~
  244.  
  245. Call for discussion!
  246.  
  247. What do you think about all of this? Are the two scripts useful, will
  248. anyone use it? What can be improved? How about the method for detecting the
  249. appdef-dir? Are there any public directories I've missed?
  250.  
  251. Tell me! Either via private email (hubert.feyrer@rz.uni-regensburg.de) or
  252. the NetBSD/amiga mailing list (amiga@netbsd.org).
  253.  
  254.  
  255. Enjoy,
  256.  
  257.        Hubert
  258.  
  259. =============== Hubert Feyrer ============================================
  260.       Weekdays: Rennerstr. 19, D-93053 Regensburg,  Tel. 0941/943-2905
  261.       Weekends: Bachstr. 40,   D-84066 Mallersdorf, Tel. 08772/6084
  262.       Internet: hubert.feyrer@rz.uni-regensburg.de == IRC: hubertf
  263. ==========================================================================
  264.